package phase4Specification.testing;

import dbPhase.hypeerweb.BroadcastVisitor;
import dbPhase.hypeerweb.Node;
import dbPhase.hypeerweb.Parameters;

public class DepositBroadcastVisitor extends BroadcastVisitor {
    public DepositBroadcastVisitor() {
        super();
    }
    
    //Before invoking the visit operation for the first time, parameters must have an object
    //with key DEPOSIT_KEY (see below) and an object associated with DEPOSIT_KEY in the parameters.
    
    @Override
    protected void operation(Node node, Parameters parameters) {
        Object deposit = parameters.get(DEPOSIT_KEY);
        node.getContents().set(DEPOSIT_KEY, deposit);
    }
    
    public static final String DEPOSIT_KEY = "depositKey";
} 